import request from '@/utils/request';

// 查询系统总览
export function systemOverviewList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/systemOverviewList',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询失败量趋势
export function failTrendList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/failTrendList',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询系统业务访问量TopN
export function businessVisitsTopNList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/businessVisitsTopNList',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询系统业务健康度TopN
export function businessHealthyTopNList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/businessHealthyTopNList',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询系统请求量趋势
export function requestTrendList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/requestTrendList',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'LSH',
		},
	});
}

// 查询网端流量TopN
export function segmentFlowTopNList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/querySegmentFlowTop',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询网端请求TopN
export function segmentReqTopNList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/querySegmentReqTop',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询系统网端告警TopN
export function segmentAlarmTopNList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/segmentAlarmTopNList',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询系统告警趋势
export function systemAlarmTrendList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/systemAlarmTrendList',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询流量变化趋势
export function flowTrendList(data?: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/queryFlowTrend',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'LSH',
		},
	});
}

// 业务办理时长变化趋势
export function busiDealTimeTrendList(data?: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/queryBusinessHandleTrend',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询失败量、请求量、告警量趋势
export function allTrendList(data?: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/home/cockpit/allTrendList',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}
